package org.hoefling.ontology;

import de.dailab.jiactng.agentcore.comm.CommunicationAddressFactory;
import de.dailab.jiactng.agentcore.comm.IGroupAddress;

/**
 * Provides one instance of the group address, pure singleton pattern.
 *
 * @author Kseniya
 */
public class AuctionGroup {

    private static final String ADDRESS_NAME = "auctiongroup";
    private static AuctionGroup instance;
    private final IGroupAddress address;

    private AuctionGroup() {
        this.address = CommunicationAddressFactory.createGroupAddress(ADDRESS_NAME);
    }

    public IGroupAddress getAddress() {
        return address;
    }

    public static AuctionGroup getInstance() {
        if (instance == null) {
            instance = new AuctionGroup();
        }
        return instance;
    }
}
